﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Windows.Assistance.Domain;

namespace Windows.Assistance.Infrastructure.EFCore
{
    public class DictionaryCategoryMapping : IEntityTypeConfiguration<DictionaryCategory>
    {
        public void Configure(EntityTypeBuilder<DictionaryCategory> builder)
        {
            builder.HasQueryFilter(x => x.IsEnable);
            builder.Property(x => x.Category).HasMaxLength(50);
            builder.Property(x => x.Name).HasMaxLength(50);
            builder.Property(x => x.Remark).IsRequired(false).HasMaxLength(500);
        }
    }
}
